import { http } from "@/utils/http.js";

//用户信息
export const userinfo = (data) => {
  return http.request({
    method: "get",
    url: "/user/info",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const earnCount = (data) => {
  return http.request({
    method: "get",
    url: "/user/earnCount",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

//微信jssdk
export const jssdk = (data) => {
  return http.request({
    method: "POST",
    url: "/common/jssdk",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 跳转信息
export const skip = (data) => {
  return http.request({
    method: "get",
    url: "/common/skip",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 跳转信息
export const addressList = (data) => {
  return http.request({
    method: "get",
    url: "/user/addressList",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 跳转信息
export const poster = (data) => {
  return http.request({
    method: "get",
    url: "/user/poster",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const productnumber = (data) => {
  return http.request({
    method: "get",
    url: "/order/product/number",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const userqueryUser = (data) => {
  return http.request({
    method: "get",
    url: "/user/queryUser",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

// 更改推荐人
export const editReferrerApi = (data) => {
  return http.request({
    method: "POST",
    url: "/user/editReferrer",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const mine = (data) => {
  return http.request({
    method: "get",
    url: "/user/balance/mine",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const settleCheck = (data) => {
  return http.request({
    method: "POST",
    url: "/user/balance/settleCheck",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const relationstate = (data) => {
  return http.request({
    method: "get",
    url: "/user/relation/state",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const relationcollect = (data) => {
  return http.request({
    method: "POST",
    url: "/user/relation/collect",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const baseagree = (data) => {
  return http.request({
    method: "get",
    url: "/base/agree",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const agreeListApi = (data) => {
  return http.request({
    method: "get",
    url: "/base/agreeList",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const problemListApi = (data) => {
  return http.request({
    method: "get",
    url: "/base/problemList",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const problemDetailApi = (data) => {
  return http.request({
    method: "get",
    url: "/base/problemDetail",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const isPayPassApi = (data) => {
  return http.request({
    method: "GET",
    url: "/user/isPayPass",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const checkPayPass = (data) => {
  return http.request({
    method: "POST",
    url: "/user/checkPayPass",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const resetPasswordBySmsCodeApi = (data) => {
  return http.request({
    method: "POST",
    url: "/user/resetPasswordBySmsCode",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const historyApi = (data) => {
  return http.request({
    method: "POST",
    url: "/user/history",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const cardedit = (data) => {
  return http.request({
    method: "POST",
    url: "/user/card/card_edit",
    data: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const mycard = (data) => {
  return http.request({
    method: "get",
    url: "/user/card/my_card",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const history = (data) => {
  return http.request({
    method: "get",
    url: "/user/card/history",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const cardshare = (data) => {
  return http.request({
    method: "get",
    url: "/user/card/card_share",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const upAreaApi = (data) => {
  return http.request({
    method: "get",
    url: "/user/upArea",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};

export const userlevel = (data) => {
  return http.request({
    method: "get",
    url: "/user/level",
    params: {
      ...data,
      offLoading: true, // 加参数关闭api请求全局加载中提示
    },
  });
};
